package com.whu.service.impl;

import com.whu.service.StudentService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

@Service
public class StudentServiceImpl implements StudentService {

    Logger logger = LoggerFactory.getLogger(getClass());

    @Override
    public void save(Integer i) throws Exception {
        if(i==1){
            logger.info("student save···");
        }else{
            throw new Exception("保存异常！！！");
        }
    }

    @Override
    public void study(Integer i) throws Exception {
        if(i==1){
            logger.info("student study···");
        }else{
            throw new Exception("学习异常！！！");
        }
    }
}
